// 1.导入Vue-router包
import VueRouter from 'vue-router'
// 导入对应的路由组件
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopCarContainer from './components/tabbar/ShopCarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewsList from './components/news/NewsList.vue'
import Newsinfo from './components/news/Newsinfo.vue'
import photos from './components/photos/photosList.vue'
import photoinfo from './components/photos/photoinfo.vue'
import goodslist from './components/good/goodslist.vue'
import goodsinfo from './components/good/goodsinfo.vue'
import goodsdesc from './components/good/goodsdesc.vue'
import goodscomment from './components/good/goodscomment.vue'
// 3.创建路由对象
var router = new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/member',component:MemberContainer},
        {path:'/shopcar',component:ShopCarContainer},
        {path:'/search',component:SearchContainer},
        {path:'/home/newslist',component:NewsList},
        {path:'/home/newsinfo/:id',component:Newsinfo},
        {path:'/home/photoslist',component:photos},
        {path:'/home/photoinfo/:id',component:photoinfo},
        {path:'/home/goodslist',component:goodslist},
        {path:'/home/goodsinfo/:id',component:goodsinfo},
        {path:'/home/goodsdesc/:id',component:goodsdesc},
        {path:'/home/goodscomment/:id',component:goodscomment}
    ],
    linkActiveClass:'mui-active' //覆盖默认的路由高亮的类,默认router-link-active
})
export default router